import React,{Component} from "react";
import { glabalContext } from "./common/js/globalData";
const { Consumer } = glabalContext
class ToChild11 extends Component {
  state = {  }
  render() { 
    return (
      <div>
         {/* 孙子组件也需要读取-父父组件的role数据 */}
         <div>
            这是Child1的子组件,孙子组件
            <Consumer>
               {
                value=>(<div>{value.role}</div>)
               }
            </Consumer>
         </div>
      </div>
    );
  }
}
 
export default ToChild11;